<HTML>
<HEAD>
    <TITLE>ASC..NATIVE</TITLE>
    <script language="javascript">
        function native2ascii(){
            var regexp=/[^\x00-\xff]/g;
            var n=document.getElementById("native").value;
            var a=n;
            while(m=regexp.exec(n)){
                a=a.split(m[0]).join(escape(m[0]).split("%").join("\\"));
            }
            document.getElementById("ascii").value=a;
        }

        function ascii2native() {
            var a=document.getElementById("ascii").value;
            var n=a;
            var n=unescape(n.split("\\").join("%"));
            document.getElementById("native").value=n;
        }
    </script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></HEAD>
<BODY>
    <h1>ASC..NATIVE</h1>
    ASC:<br>
    <textarea id="ascii" rows="10" cols="100"></textarea><br>
<input type="button" id="back" value="ascii2native" onClick="ascii2native()"/>
    &nbsp;&nbsp;&nbsp;&nbsp;
    <input type="button" id="convert" value="native2ascii" onClick="native2ascii()"/><br>
    ..:
    <br>
    <textarea id="native" rows="10" cols="100"></textarea>
</BODY>
</HTML>
